#include <stdio.h>
int main()
{
    __int64 n,f[36][36],t=0,t2=0,i,j;
    f[0][0]=1;
    while (scanf("%I64d",&n)!=EOF)
    {
        t2++;
        if (n==-1)break;
        if (t<n)
        {
            for (i=t+1;i<=n;i++)
            {
                for (j=0;j<=i;j++)
                {
                    if (j==0)f[i][j]=f[i-1][j];
                    else if (j==i)f[i][j]=f[i][j-1];
                    else f[i][j]=f[i-1][j]+f[i][j-1];
                }
            }
            printf("%I64d %I64d %I64d\n",t2,n,f[n][n]*2);
            t=n;
        }
        else
        {
            printf("%I64d %I64d %I64d\n",t2,n,f[n][n]*2);
        }
    }
    return 0;
}
